﻿using System;

namespace enyo
{
    /// <summary>
    /// A view that slides back and forth and is designed to be a part of a SlidingPane.
    /// </summary>
    public class SlidingView : Control
    {
        /// <summary>
        /// Can drag panel from anywhere (note: does not work if there's another drag surface (e.g. scroller)).
        /// </summary>
        public bool DragAnywhere { get; set; }

        /// <summary>
        /// Can drag/toggle by dragging on left edge of sliding panel.
        /// </summary>
        public bool EdgeDragging { get; set; }

        /// <summary>
        /// Whether content width should or should not be adjusted based on size changes.
        /// </summary>
        public bool FixedWidth { get; set; }

        /// <summary>
        /// Minimum content width.
        /// </summary>
        public int MinWidth { get; set; }

        /// <summary>
        /// Amount we should be shifted right to reveal panel underneath us when selected.
        /// </summary>
        public int PeekWidth { get; set; }

        /// <summary>
        /// Whether or not the view may be dragged right to dismiss it
        /// </summary>
        public bool Dismissible { get; set; }

        //TODO:Move to parent??
        public bool Lazy { get; set; }

        public EnyoEvent<Control, int/*TODO:correct? width*/> onResize;
    }
}
